The present invention relates to a memory card device and a method for rewriting data therein, the memory card device being composed of a flash EEPROM which is an electrically erasable, writable, readable non-volatile memory device.
2. Description of the Related Art
In a rewriting operation, if a flash EEPROM chip has already had data written into it, a rewriting operation has to be performed, unlike a RAM chip after all data in the memory chip have been erased.
Conventionally, according to the flow chart shown in FIG. 6, in a case in which data in an area within a chip (shown in FIG. 7) are rewritten, a method has been used which includes: retrieving a chip including data to be rewritten when a rewriting request arrives (step 601); reading out all data in the chip including the data to be rewritten into a memory device to save them (step 602); and erasing the chip including the data to be rewritten (step 603); reading out from the memory device the saved data extending from the head data, or first data from the chip, saved in the step 602 to the data just before data to be rewritten from the memory device, and writing that data into the chip erased in the step 603 (step 604); writing the new rewrite data into the chip erased in the step 603 (step 605); and reading out the data extending from the data just after data to be rewritten to the last data in the data saved in the step 602 from the memory device, and writing them into the chip erased in the step 603 (step 606).
However, there is the problem, in the conventional method of writing to a non-volatile memory card using a flash EEPROM, that an additional memory device for saving all data in a memory chip including rewritten data is required, whereby not only data to be rewritten, but also other data in the chip could be lost due upon the occurrence of a power failure or the like during a rewriting operation.